Optimal. Leaf size=36 \[ -\frac {a+b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {6037, 272, 36,
29, 31} \begin {gather*} -\frac {a+b \tanh ^{-1}(c x)}{x}-\frac {1}{2} b c \log \left (1-c^2 x^2\right )+b c \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 272
Rule 6037
Rubi steps
\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{x^2} \, dx &=-\frac {a+b \tanh ^{-1}(c x)}{x}+(b c) \int \frac {1}{x \left (1-c^2 x^2\right )} \, dx\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x \left (1-c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} \left (b c^3\right ) \text {Subst}\left (\int \frac {1}{1-c^2 x} \, dx,x,x^2\right )\\ &=-\frac {a+b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 39, normalized size = 1.08 \begin {gather*} -\frac {a}{x}-\frac {b \tanh ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1-c^2 x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 50, normalized size = 1.39
method | result | size |
derivativedivides | \(c \left (-\frac {a}{c x}-\frac {b \arctanh \left (c x \right )}{c x}-\frac {b \ln \left (c x -1\right )}{2}+b \ln \left (c x \right )-\frac {b \ln \left (c x +1\right )}{2}\right )\) | \(50\) |
default | \(c \left (-\frac {a}{c x}-\frac {b \arctanh \left (c x \right )}{c x}-\frac {b \ln \left (c x -1\right )}{2}+b \ln \left (c x \right )-\frac {b \ln \left (c x +1\right )}{2}\right )\) | \(50\) |
risch | \(-\frac {b \ln \left (c x +1\right )}{2 x}+\frac {2 b c \ln \left (x \right ) x -b c \ln \left (c^{2} x^{2}-1\right ) x +b \ln \left (-c x +1\right )-2 a}{2 x}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 39, normalized size = 1.08 \begin {gather*} -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} - 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \operatorname {artanh}\left (c x\right )}{x}\right )} b - \frac {a}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 47, normalized size = 1.31 \begin {gather*} -\frac {b c x \log \left (c^{2} x^{2} - 1\right ) - 2 \, b c x \log \left (x\right ) + b \log \left (-\frac {c x + 1}{c x - 1}\right ) + 2 \, a}{2 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.31, size = 41, normalized size = 1.14 \begin {gather*} \begin {cases} - \frac {a}{x} + b c \log {\left (x \right )} - b c \log {\left (x - \frac {1}{c} \right )} - b c \operatorname {atanh}{\left (c x \right )} - \frac {b \operatorname {atanh}{\left (c x \right )}}{x} & \text {for}\: c \neq 0 \\- \frac {a}{x} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 94 vs.
\(2 (34) = 68\).
time = 0.41, size = 94, normalized size = 2.61 \begin {gather*} {\left (b \log \left (-\frac {c x + 1}{c x - 1} - 1\right ) - b \log \left (-\frac {c x + 1}{c x - 1}\right ) + \frac {b \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {c x + 1}{c x - 1} + 1} + \frac {2 \, a}{\frac {c x + 1}{c x - 1} + 1}\right )} c \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.70, size = 33, normalized size = 0.92 \begin {gather*} b\,c\,\ln \left (x\right )-\frac {a+b\,\mathrm {atanh}\left (c\,x\right )}{x}-\frac {b\,c\,\ln \left (c^2\,x^2-1\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________